class FrictionButton{
  PVector location;
  String label;
  int buttonLength;
  int buttonHeight;
  color col;
  
  FrictionButton(PVector location, String label, color col){
    this.location = location;
    this.label = label;
    buttonLength = 100;
    buttonHeight = 30;
    this.col = col;
  }
  
  // Return the button's label
  String getLabel(){
      return label;   
  }
  
  // Draw each button
  void display(){
    stroke(col);
    strokeWeight(3);
    fill(0);
    rect(location.x, location.y, buttonLength, buttonHeight);
    
    textAlign(CENTER, CENTER);
    textSize(16);
    fill(col);
    text(label, location.x + (buttonLength / 2), location.y + (buttonHeight / 2));
  }
  
  // Change the cursor to a hand, when it's above a button
  void changeCursor(){
    if (mouseX < location.x + buttonLength && mouseX > location.x &&
         mouseY < location.y + buttonHeight && mouseY > location.y){
      cursor(HAND);     
    } 
  }
}
